# 用requests框架 快速测试

import requests

url = "https://www.sogou.com/web?query=周杰伦"

headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"
}

resp = requests.get(url, headers=headers)
resp.encoding = 'utf-8'

body = resp.text
print(body)

# 记得关闭
resp.close()